<template>
	<view class="avatar-wrap" :style="{width:width+'rpx'}">
		<image :style="{height:height+'rpx',width:width+'rpx',borderRadius:radius+'%'}" :src='img'></image>
		<text class="goshop-font-size-sm text-color-one u-flex-xy-center">{{name}}</text>
	</view>
</template>

<script>
	export default {
		name:"goshop-avatar",
		props: {
		  width:{
			  type:Number,
			  default:84
		  },
		  height:{
			  type:Number,
			  default:84
		  },
		  img:{
			  type:String,
			  default:''
		  },
		  name:{
			  type:String,
			  default:''
		  },
		  radius:{
			  type:Number,
			  default:50
		  }
		},
		mounted(){
			console.info(this.name);
			console.info(this.img);
			
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
.avatar-wrap{
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
}
</style>